#pragma once

#include "stdafx.h"

#define UART_RXTX_BUF_SIZE 1024
#define UART_INTERVAL_TIME_OUT 0
#define UART_TOTAL_TIME_OUT_CONSTANT 10
#define UART_TOTAL_TIME_OUT_MULTIPLIER 0

#define UART_DEFAULT_BYTE_SIZE 8
#define UART_INVALID_HANDLE ((HANDLE)-1)

extern HANDLE UartOpen(char *pComName, int iBaudrate);
extern BOOL UartRead(HANDLE hCom, CHAR *pRdBuf, INT iExLen, INT *pRdLen);
extern BOOL UartWrite(HANDLE hCom, CHAR *pWrBuf, INT iExLen, INT *pWrLen);
extern VOID UartClose(HANDLE hCom);
